package chwgigs.swing.jdbc;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import javax.swing.JButton;
import java.awt.Dialog.ModalityType;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;

public class J26_SungJukAboutDialog extends JDialog{
	
	public J26_SungJukAboutDialog(JFrame P){
		super(P);
		
		setModalityType(ModalityType.DOCUMENT_MODAL);
		setTitle("프로젝트 정보");
		setSize(450, 300);
		
		JPanel westp = new JPanel();
		getContentPane().add(westp, BorderLayout.WEST);
		westp.setLayout(new BoxLayout(westp, BoxLayout.X_AXIS));
		
		JLabel imglbl = new JLabel("New label");
		imglbl.setIcon(new ImageIcon(J26_SungJukAboutDialog.class.getResource("/images/1385446354_view.png")));
		westp.add(imglbl);
		
		JPanel eastp = new JPanel();
		getContentPane().add(eastp, BorderLayout.EAST);
		eastp.setLayout(new BoxLayout(eastp, BoxLayout.X_AXIS));
		
		JLabel introlbl = new JLabel("New label");
		introlbl.setHorizontalAlignment(SwingConstants.CENTER);
		eastp.add(introlbl);
		
		JPanel southp = new JPanel();
		getContentPane().add(southp, BorderLayout.SOUTH);
		
		JButton okbtn = new JButton("확인");
		okbtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			//System.exit(0);
		    setVisible(false); //AboutDialog 를 화면에서 지우고 
			dispose(); //메모리에 생서된 AboutDialog 객체를 제거 
			
			}
		});
		southp.add(okbtn);
		
		setVisible(true);
		
		
	}
        
}
